package com.qk.management.mapper;

import com.qk.entity.Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @文件名: RoleMapper
 * @作者: DX
 * @创建日期: 2025/10/8
 * @描述:
 */
@Mapper
public interface RoleMapper {

    public List<Role> list(@Param("name") String name,
                           @Param("label") String label);

    @Select("select * from role")
    List<Role> listAll();

    @Delete("delete from role where id = #{id}")
    void delete(Integer id);

    void add(Role role);

    @Select("select * from role where id = #{id}")
    Role getById(Integer id);

    void update(Role role);
}
